<h1><?php echo $fund['name'] ?></h1>
<ul id="breadcrumb">
	<li><span>จัดการข้อมูลหลัก</span></li>	
	<li>จับคู่บัญชี</li>		
</ul>
<div id="content">
	<div class="search">
		<form method="get">
		<label>ประเภท</label> <?php echo form_dropdown('type_id',get_option('id','name','voucher_types'),(empty($_GET['type_id']))?'':$_GET['type_id'],'','ทั้งหมด') ?>
		  <label>ชื่อ</label> <input type="text" name="search" value="<?php echo (!empty($_GET['search']))?$_GET['search']:'' ?>" />
		  &nbsp;<input type="submit" value="<?php echo lang('search'); ?>" class="button" />
		</form>
	</div>
<table class="list">
	<tr>
		<th>ชื่อ</th>
		<th width="100">ประเภท</th>
		<th width="200"><a href="voucher/match/form/<?php echo $fund['id'] ?>" class="button"><span class="icon_text addnew"></span>เพิ่มรายการ</a></th>
	</tr>
	<?php if($result): ?>
	<? foreach($result as $key => $item): ?>
	<tr <?php echo cycle($key) ?>>
		<td><?php echo $item['name']?></td>
		<td><?php echo $type[$item['voucher_type_id']]?></td>
		<td class="center"><a href="voucher/match/form/<?php echo $fund['id'] ?>/<?php echo $item['id'] ?>" class="button"><span class="icon_text edit"></span>แก้ไข</a> <a href="voucher/match/delete/<?php echo $item['id'] ?>" onclick="return confirm('<?php echo lang('confirm_delete')?>')" class="button"><span class="icon_text cancel"></span>ลบ</a></td>
	</tr>
	<? endforeach; ?>
	<?php else: ?>
	<tr>
		<td colspan="2" class="center">- ไม่มีข้อมูล -</td>
	</tr>
	<?php endif; ?>
</table>
<?php echo $pagination; ?>
</div>